d <- highlight_key(rep1)

base <- plot_ly(d, size=I(0.3), showlegend = FALSE)
# color = I("black"),
subplot(
  # add_histogram(base, x = ~class),
  add_markers(base, x= ~hct_son, y=~hct_lmnb),
  add_markers(base, x = ~hct_mki67, y = ~hct_pol1),
  add_markers(base, x= ~hct_son, y=~hct_mki67),
  add_markers(base, x= ~hct_mki67, y=~hct_lmnb),
  titleX = TRUE,titleY = TRUE,nrows = 2
  
)%>%
  # Selections are actually additional traces, and, by default, 
  # plotly.js will try to dodge bars placed under the same category
  layout(barmode = "overlay", dragmode = "lasso") %>%
  highlight("plotly_selected")
## Warning: `arrange_()` is deprecated as of dplyr 0.7.0.
## Please use `arrange()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
## Setting the `off` event (i.e., 'plotly_deselect') to match the `on` event (i.e., 'plotly_selected'). You can change this default via the `highlight()` function.